package com.woniuxy.lifeorder.api.feign.factory;

import com.woniuxy.lifeorder.api.feign.OrderItemService;
import com.woniuxy.lifeorder.api.feign.fallback.OrderItemServiceFallbackImpl;
import feign.hystrix.FallbackFactory;

public class OrderItemServiceFallbackFactory implements FallbackFactory<OrderItemService> {
    @Override
    public OrderItemService create(Throwable throwable) {
        OrderItemServiceFallbackImpl orderItemServiceFallback=new OrderItemServiceFallbackImpl();
        orderItemServiceFallback.setCause(throwable);
        return orderItemServiceFallback;
    }
}
